package com.aier.classes.entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Classes entity. @author MyEclipse Persistence Tools
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "homework_comment", catalog = "abc")
public class HomeworkComment implements java.io.Serializable {

    // 主键
    private Long chid;
    // 作业id
    private Long hid;
    // 评论的人的用户id
    private Long uid;
    // 内容
    private String content;
    // 图片
    private String img;
    // 职务+名称或学生名+关系
    private String cname;
    // 评论的时间
    private Timestamp cdate;
    
    private String headimg;
    
    // 回复列表
    private List<HomeworkCR> hcrList;
    
    /** default constructor */
    public HomeworkComment() {
    }

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "chid", unique = true, nullable = false)
    public Long getChid() {
        return chid;
    }

    public void setChid(Long chid) {
        this.chid = chid;
    }

    @Column(name = "hid")
    public Long getHid() {
        return hid;
    }

    public void setHid(Long hid) {
        this.hid = hid;
    }
    
    @Column(name = "uid")
    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Column(name = "img")
    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    @Column(name = "cname")
    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    @Column(name = "cdate")
    public Timestamp getCdate() {
        return cdate;
    }

    public void setCdate(Timestamp cdate) {
        this.cdate = cdate;
    }

    public String getHeadimg() {
        return headimg;
    }

    public void setHeadimg(String headimg) {
        this.headimg = headimg;
    }

    public List<HomeworkCR> getHcrList() {
        return hcrList;
    }

    public void setHcrList(List<HomeworkCR> hcrList) {
        this.hcrList = hcrList;
    }

}